/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "sctptbmeses")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sctptbmeses.findAll", query = "SELECT s FROM Sctptbmeses s"),
    @NamedQuery(name = "Sctptbmeses.findBySctptbmesesid", query = "SELECT s FROM Sctptbmeses s WHERE s.sctptbmesesid = :sctptbmesesid"),
    @NamedQuery(name = "Sctptbmeses.findByNombre", query = "SELECT s FROM Sctptbmeses s WHERE s.nombre = :nombre")})
public class Sctptbmeses implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sctptbmesesid")
    private Integer sctptbmesesid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "nombre")
    private String nombre;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctptbmesesid")
    private Collection<Sciftbinftecn> sciftbinftecnCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctptbmesesid")
    private Collection<Sciftbinfdoc> sciftbinfdocCollection;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sctptbmesesid")
    private Collection<Sciftbplandoc> sciftbplandocCollection;

    public Sctptbmeses() {
    }

    public Sctptbmeses(Integer sctptbmesesid) {
        this.sctptbmesesid = sctptbmesesid;
    }

    public Sctptbmeses(Integer sctptbmesesid, String nombre) {
        this.sctptbmesesid = sctptbmesesid;
        this.nombre = nombre;
    }

    public Integer getSctptbmesesid() {
        return sctptbmesesid;
    }

    public void setSctptbmesesid(Integer sctptbmesesid) {
        this.sctptbmesesid = sctptbmesesid;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    @XmlTransient
    public Collection<Sciftbinftecn> getSciftbinftecnCollection() {
        return sciftbinftecnCollection;
    }

    public void setSciftbinftecnCollection(Collection<Sciftbinftecn> sciftbinftecnCollection) {
        this.sciftbinftecnCollection = sciftbinftecnCollection;
    }

    @XmlTransient
    public Collection<Sciftbinfdoc> getSciftbinfdocCollection() {
        return sciftbinfdocCollection;
    }

    public void setSciftbinfdocCollection(Collection<Sciftbinfdoc> sciftbinfdocCollection) {
        this.sciftbinfdocCollection = sciftbinfdocCollection;
    }

    @XmlTransient
    public Collection<Sciftbplandoc> getSciftbplandocCollection() {
        return sciftbplandocCollection;
    }

    public void setSciftbplandocCollection(Collection<Sciftbplandoc> sciftbplandocCollection) {
        this.sciftbplandocCollection = sciftbplandocCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sctptbmesesid != null ? sctptbmesesid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sctptbmeses)) {
            return false;
        }
        Sctptbmeses other = (Sctptbmeses) object;
        if ((this.sctptbmesesid == null && other.sctptbmesesid != null) || (this.sctptbmesesid != null && !this.sctptbmesesid.equals(other.sctptbmesesid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Sctptbmeses[ sctptbmesesid=" + sctptbmesesid + " ]";
    }
    
}
